/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-05-12 10:57:53
 * @LastEditors: voanit
 * @LastEditTime: 2022-05-12 16:56:20
 */
//  "filter": "all",  // all（全部）, active(没有完成的) completed(完成的)

// action: { type: 'filter/mod', payload: 'active'}

export default function filter(state = 'all', action) {
  // console.log(action)
  switch (action.type) {
    case 'active':
      return action.payload
    case 'completed':
      return action.payload
    case 'all':
      return action.payload
    default:
      return state
  }
}
